fix(hover): reuse warm browser profile session#38
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the Hover browser-backed authentication flow by reusing an existing (“warm”) persistent Chrome profile session when it’s still valid, avoiding unnecessary password/TOTP logins across runs.
Changes:
- Copies persisted browser profile cookies into the Go HTTP client and probes
GET /api/domainsto detect an already-authenticated session. - Skips the credential/TOTP login path when the warm session probe indicates the session is still accepted; otherwise falls back to the existing browser login flow.
- Updates documentation and bumps
plugin.jsonto0.5.6.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Documents warm-profile reuse behavior and the /api/domains probe before credential login. |
| plugin.json | Bumps plugin version to 0.5.6. |
| pkg/hoverclient/browser_backend.go | Adds warm-cookie handoff + /api/domains probe and early-return reuse path before full signin. |
| pkg/hoverclient/browser_backend_test.go | Adds tests covering warm-session reuse and fallback behavior; adds helper to seed profile cookies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
--- PASS: TestBrowserBackend_LoginReusesWarmBrowserProfileSession (2.79s)
=== RUN TestBrowserBackend_LoginFallsBackWhenWarmProfileUnauthenticated
--- PASS: TestBrowserBackend_LoginFallsBackWhenWarmProfileUnauthenticated (1.57s)
PASS
ok github.com/GoCodeAlone/workflow-plugin-hover/pkg/hoverclient 4.611s
--- PASS: TestBrowserBackend_LoginSkipsWhenFresh (1.48s)
=== RUN TestBrowserBackend_LoginReusesWarmBrowserProfileSession
--- PASS: TestBrowserBackend_LoginReusesWarmBrowserProfileSession (2.54s)
=== RUN TestBrowserBackend_LoginFallsBackWhenWarmProfileUnauthenticated
--- PASS: TestBrowserBackend_LoginFallsBackWhenWarmProfileUnauthenticated (1.45s)
PASS
ok github.com/GoCodeAlone/workflow-plugin-hover/pkg/hoverclient 5.699s
ok github.com/GoCodeAlone/workflow-plugin-hover/internal 0.949s
ok github.com/GoCodeAlone/workflow-plugin-hover/internal/drivers 0.235s
ok github.com/GoCodeAlone/workflow-plugin-hover/pkg/hoverclient 30.260s
Generated by the implementing agent.